import request from '@/utils/request'


export function couponList(params) {
  return request({
    url: `/restaurant/coupon/list`,
    method: 'get',
    params
  })
}

export function couponAdd(data) {
  return request({
    url: `/restaurant/coupon`,
    method: 'post',
    data
  })
}

export function couponDelete(couponIds) {
  return request({
    url: `/restaurant/coupon/${couponIds}`,
    method: 'delete',
  })
}

export function couponDetails(couponIds) {
  return request({
    url: `/restaurant/coupon/${couponIds}`,
    method: 'get',
  })
}

export function couponEdit(data) {
  return request({
    url: `/restaurant/coupon`,
    method: 'put',
    data
  })
}

export function couponExport(params) {
  return request({
    url: `/restaurant/coupon/export`,
    method: 'get',
    params
  })
}
